package db

import (
	"d-serv-go/server/core/bean"
)

type SqlExecutorInterface interface {
	QueryCall(sql string, args []interface{}, call Callback) ([]*bean.Bean, error)

	Query(sql string, values []interface{}, call Callback) ([]*bean.Bean, error)

	QueryOne(sql string, values []interface{})(*bean.Bean, error)

	QueryById(sql string, values []interface{})(*bean.Bean, error)

	Count(sql string, values []interface{})(int, error)

	QueryPage(sql string, offset int, count int, values []interface{}, call Callback) ([]*bean.Bean, error)

	Execute(sql string, values []interface{}) (int64, error)

	ExecuteBatch(sql string, values []interface{}) (int64, error)
}
